package com.longqin.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 项目问题表
 * </p>
 *
 * @author longqin
 * @since 2025-04-08
 */
@Getter
@Setter
@TableName("bus_project_problem")
@ApiModel(value = "BusProjectProblem对象", description = "项目问题表")
public class BusProjectProblem implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("项目id")
    @TableField("project_id")
    private Integer projectId;

    @ApiModelProperty("问题标题")
    @TableField("title")
    private String title;

    @ApiModelProperty("问题来源")
    @TableField("source")
    private Integer source;

    @ApiModelProperty("问题等级")
    @TableField("level")
    private Integer level;

    @ApiModelProperty("问题描述")
    @TableField("description")
    private String description;

    @ApiModelProperty("期望解决时间")
    @TableField("expect_time")
    private LocalDateTime expectTime;

    @ApiModelProperty("状态：1-编辑中，2-未解决，3-已解决，4-已关闭，0-删除")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("提出人id")
    @TableField("creator")
    private Integer creator;

    @ApiModelProperty("提出时间")
    @TableField("create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 前端时间字符串转java时间戳
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") // 后台时间戳转前端时间字符串(json对象)
    private LocalDateTime createTime;

    @ApiModelProperty("责任人")
    @TableField("assigner")
    private Integer assigner;

    @ApiModelProperty("附件")
    @TableField("attachments")
    private String attachments;

    @ApiModelProperty("解决方案")
    @TableField("resolve_type")
    private Integer resolveType;

    @ApiModelProperty("解决备注")
    @TableField("resolve_remark")
    private String resolveRemark;

    @ApiModelProperty("解决人")
    @TableField("resolve_people")
    private Integer resolvePeople;

    @ApiModelProperty("解决时间")
    @TableField("resolve_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 前端时间字符串转java时间戳
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") // 后台时间戳转前端时间字符串(json对象)
    private LocalDateTime resolveTime;
    
    @ApiModelProperty("提出人昵称")
    @TableField(exist = false)
    private String creatorName;
    
    @ApiModelProperty("责任人昵称")
    @TableField(exist = false)
    private String assignerName;
    
    @ApiModelProperty("解决人昵称")
    @TableField(exist = false)
    private String resolveName;
    
    @ApiModelProperty("流程工作进程ID")
    @TableField(exist = false)
    private Integer processId;
    
    @ApiModelProperty("实例节点配置项")
    @TableField(exist = false)
    private String workNodes;


}
